<%--
  Created by IntelliJ IDEA.
  User: lijincheng
  Date: 2020/7/12
  Time: 10:06 上午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/WEB-INF/views/common/head.jsp"%>
    <div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>订单管理页面 >> 订单添加页面</span>
        </div>
        <div class="providerAdd">
            <form id="billForm" name="billForm" method="post" action="###">
                <!--div的class 为error是验证错误，ok是验证成功-->
                <div class="">
                    <label for="billCode">订单编码：</label>
                    <input type="text" name="billCode" class="text" id="billCode" value="">
                    <!-- 放置提示信息 -->
                    <font color="red"></font>
                </div>
                <div>
                    <label for="productName">商品名称：</label>
                    <input type="text" name="productName" id="productName" value="">
                    <font color="red"></font>
                </div>
                <div>
                    <label for="productDesc">商品描述：</label>
                    <input type="text" name="productDesc" id="productDesc" value="">
                    <font color="red"></font>
                </div>
                <div>
                    <label for="productUnit">商品单位：</label>
                    <input type="text" name="productUnit" id="productUnit" value="">
                    <font color="red"></font>
                </div>
                <div>
                    <label for="productCount">商品数量：</label>
                    <input type="text" name="productCount" id="productCount" value="">
                    <font color="red"></font>
                </div>
                <div>
                    <label for="totalPrice">总金额：</label>
                    <input type="text" name="totalPrice" id="totalPrice" value="">
                    <font color="red"></font>
                </div>
                <div>
                    <label >供应商：</label>
                    <select name="providerId" id="providerId">
                    </select>
                    <font color="red"></font>
                </div>
                <div>
                    <label >是否付款：</label>
                    <input type="radio" name="isPayment" value="1" checked="checked">未付款
                    <input type="radio" name="isPayment" value="2" >已付款
                </div>
                <div class="providerAddBtn">
                    <input type="button" name="add" id="add" value="保存">
                    <input type="button" id="back" name="back" value="返回" >
                </div>
            </form>
        </div>
    </div>
</section>


<footer class="footer">
    千峰科技
</footer>
<script type="text/javascript" src="/statics/js/time.js"></script>
<script type="text/javascript" src="/statics/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/statics/js/common.js"></script>
<script type="text/javascript" src="/statics/js/billadd.js"></script>
<script type="text/javascript" src="/statics/calendar/WdatePicker.js"></script>
<script>
    $.ajax({
        async:"true",
        type:"GET",
        url:"/provider/getList",
        success:function (data) {
            if(data!=null){
                for (let i = 0; i < data.length; i++) {
                    var c = '<option value="'+data[i].id+'">'+data[i].proName+'</option>';
                    $("#providerId").append(c);
                }
            }
        }
    });
    $.ajax({
        async:"true",
        type:"GET",
        url:"/bill/getBillCode",
        success:function (data) {
            if(data!=null){
                console.log(data);
                $("#billCode").val(data);
            }
        }
    });





</script>

<script>

</script>
</body>
</html>
